package racing.server;

import racing.client.Message;

import com.lloseng.ocsf.server.AbstractServer;
import com.lloseng.ocsf.server.ConnectionToClient;

/**
 * ChatServer for chatting with another player.
 * 
 * @author Sarathit Sangtaweep 5510546182
 * @author Veerapat Teeravipark 5510547022
 * @version 2013
 */
public class ServerChat extends AbstractServer {

	/**
	 * Setup port server.
	 * @param port port of server.
	 */
	public ServerChat(int port) {
		super(port);
	}

	@Override
	protected void handleMessageFromClient(Object msg, ConnectionToClient client) {
		if (msg instanceof Message) {
			sendToAllClients(msg);
		}
	}
}
